import {Module} from '@nestjs/common';
import {CommonRedisModule} from './module/common/common.redis.module'
import {CommonRequestModule} from './module/common/common.request.module'
import {CommonMysqlModule} from './module/common/common.mysql.module';
import {UserModule} from './module/user/user.module'
import {AuthModule} from './module/wrj-apply/auth.module'
import {ApplyDeviceModule} from './module/wrj-apply/apply.device.module'
import {ApplyCategoryModule} from './module/wrj-apply/apply.category.module'
import {ApplyUserModule} from './module/wrj-apply/apply.user.module'
import {ApplyFlyerModule} from './module/wrj-apply/apply.flyer.module'
import {ApproveModule} from './module/wrj-apply/approve.module'
import {ApplyModule} from './module/wrj-apply/apply.module'
import {LoginModule} from './module/wrj-apply/login.module'
import {EventModule} from './module/event/event.module'
import {LogListModule} from './module/log/log.list.module'
import { APP_GUARD } from '@nestjs/core';
import { AuthGuard } from './auth.guard';
// import { UserListModule } from './module/user/user.list.module'
// import { WebsocketModule } from './module/websocket/ws.module'
import {CommonRedisService} from './service/common.redis.service';
import {ConfigService} from './service/config.service';

@Module({
    imports: [
        CommonRequestModule,
        CommonRedisModule,
        CommonMysqlModule,
        UserModule,
        AuthModule,
        ApplyDeviceModule,
        ApplyCategoryModule,
        ApplyUserModule,
        ApplyFlyerModule,
        ApproveModule,
        ApplyModule,
        LoginModule,
        EventModule,
        LogListModule,
        // UserListModule,
        // WebsocketModule,
    ],
    providers: [
        CommonRedisService,
        {
            provide: APP_GUARD,
            useClass: AuthGuard,
        },
        ConfigService,
    ],
    exports: [ConfigService]
})
export class AppModule {
}
